package com.common;

public enum ResultCode {
    DEFAULT_DATA_NOT_EXISTS(1000001, "查询数据不存在"),
    DEFAULT_LIST_NOT_EXISTS(1000002, "查询列表不存在"),
    PARAM_FORMAT_ERROR(1000003, "参数格式错误"),
    FAILED(1, "操作失败"),
    LOGIN_USERNAME_NOT_FOUND(1003, "用户名不存在"),
    LOGIN_PASSWORD_ERROR(1004, "登录密码错误"),
    LOGIN_USER_DISABLED(1005, "账户被禁止登录"),
    VALIDATE_FAILED(4008, "请参数校验失败"),
    RESPONSE_FAILED(1002, "响应失败"),
    SUCCESS(200, "操作成功"),
    DELETE_SUCCESS(2004, "删除数据成功"),
    NON_LOGIN(401, "未正常登录"),
    NON_AUTHOR(403, "没有权限"),
    SERVER_ERROR(500, "服务器异常"),
    INSERT_OR_UPDATE_SUCCESS(215, "发送验证码失败"),
    INSERT_OR_UPDATE_FAILED(216, "插入数据失败"),
    //请求次数过多
    REQUEST_TOO_MANY(1001, "请求次数过多"),
    //状态转换异常
    STATE_CHANGE_EXCEPTION(1006, "状态转换异常"),

    // ======================学生管理 1009000======================
    STUDENT_NUMBER_EXISTS(1009001, "注册失败"),
    STUDENT_IMPORT_EXCEPTION(1009002, "文件解析异常"),
    STUDENT_IMPORT_DATA_EMPTY(1009003, "未读取到任何数据"),
    // ======================班级管理 1011000======================
    SERVER_FILE_NAME_ERROR(1011001, "文件名不合法"),
    SERVER_FILE_DOWNLOAD_ERROR(1011002, "文件读取异常"),
    CALENDAR_NON_CONTENT_UPDATE(1012001, "没有内容需要修改");

    private final int code;
    private final String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
